View Index by Level
RANDOM PAGE

SITE SEARCH

LOG
IN

SIGN UP

HELP

Raspberry Pi - School Proxy


This is the AQA version closing after June 2019. Visit the the version for Eduqas instead.

To gain access to revision questions, please sign up and log in.

Non-Exam Extras

 a

School Networks and Proxy Servers - Security Risk

These instructions are a quick hack to get you started. This is not the best way to do the job. There is a better but still insecure solution below.

http_proxy="http://domain\\username:password@proxy_address:port/"
https_proxy=$http_proxy
export http_proxy https_proxy

http_proxy="http://student\\nbauers:thisiisnotmypassword@10.6.100.10:8080/"
https_proxy=$http_proxy
export http_proxy https_proxy

echo $http_proxy

Here is a fuller version including FTP and HTTPS settings for software that expects upper case ...

http_proxy="http://domain\\username:password@proxy_address:port/"
https_proxy=$http_proxy
ftp_proxy=$http_proxy
HTTP_PROXY=$http_proxy
HTTS_PROXY=$http_proxy
FTP_PROXY=$http_proxy
export http_proxy https_proxy ftp_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY

A Better Solution - Still not Secure

This solution still suffers from the users' passwords being accessible to other users. On a "one user one Pi" setup this is not too serious as long as everyone remembers to log out. If many users log onto one Pi it becomes very insecure.

Edit .bashrc and add something like this before everything else ...

# ===================================================================================
# ===== PROXY AUTHENTICATE ==========================================================
# ===================================================================================
clear
echo "LOGIN SUCCESSFUL."
echo ""
echo "Authenticate with the proxy server. Enter your college login credentials."
echo ""
read -p "College Username: " cuid
read -s -p "College Password: " cpwd
echo ""

http_proxy="http://student\\$cuid:$cpwd@10.6.100.10:8080/"
https_proxy=$http_proxy
ftp_proxy=$http_proxy
HTTP_PROXY=$http_proxy
HTTS_PROXY=$http_proxy
FTP_PROXY=$http_proxy
export http_proxy https_proxy ftp_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY
echo ""
echo "PROXY CONNECTED"
echo "APT::GET::AllowUnauthenticated 1;" > /etc/apt/apt.conf
echo "Acquire::http::proxy \"http://student\\$cuid:$cpwd@10.6.100.10:8080/\";" >> /etc/apt/apt.conf
echo "Acquire::https::proxy \"http://student\\$cuid:$cpwd@10.6.100.10:8080/\";" >>/etc/apt/apt.conf
echo "Acquire::ftp::proxy \"http://student\\$cuid:$cpwd@10.6.100.10:8080/\";" >> /etc/apt/apt.conf
echo ""
echo "APT PROXY CONF FILE CREATED"
echo ""
# ===================================================================================
 

Edit .bash_logout

echo "" > /etc/apt/apt.conf

 

 

 

reviseOmatic V3     Contacts, ©, Cookies, Data Protection and Disclaimers Hosted at linode.com, London